﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Magic.System;


public class DatabaseListOutput
{
    public JObject Dbs { get; set; } = new JObject();
}

public class ParseFieldDataOutput { 
    public string Comment { get; set; }
    public bool Empty { get; set; }
    public Dictionary<string, DbColumnInfoItem> Columns { get; set; }
}

public class DbColumnInfoItem
{
    /// <summary>
    /// 是否自增
    /// </summary>
    public bool AutoIncrement { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Comment { get; set; }

    /// <summary>
    /// 数据库类型
    /// </summary>
    public string DataType { get; set; }

    /// <summary>
    /// 渲染类型
    /// </summary>
    public string DesignType { get; set; }

    /// <summary>
    /// 字段名
    /// </summary>
    public string Name { get; set; }


    /// <summary>
    /// 类型，不带长度
    /// </summary>
    public string Type { get; set; }

    /// <summary>
    /// 默认值
    /// </summary>
    public string Default { get; set; }


    /// <summary>
    /// 是否可空
    /// </summary>
    public bool Null { get; set; }


    /// <summary>
    /// 是否是主键
    /// </summary>
    public bool PrimaryKey { get; set; }


    /// <summary>
    /// 
    /// </summary>
    public bool? Unsigned { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public List<object> Table { get; set; }=new List<object>();

    /// <summary>
    /// 
    /// </summary>
    public List<object> Form { get; set; }=new List<object>();

}





